<?php if((isset($_SESSION['sys_admin']))||(isset($_SESSION['admin']))||(isset($_SESSION['intern_audit']))||(isset($_SESSION['second_consult']))||(isset($_SESSION['dept_pic']))) {?>

<style type="text/css">
#tombol {
 margin-right: 10px;
 cursor: pointer;
}
#hidden_div {
 display:none;
 text-align: left;    
 z-index: 99999;
 padding: 0;
 width: 350px;
 margin-top: 5px;
 font-size: 10px;
}


</style>

<script type="text/javascript">
function add_file_field(){
var container=document.getElementById('file_container');
var file_field=document.createElement('input');
file_field.name='images[]';
file_field.type='file';
container.appendChild(file_field);
var br_field=document.createElement('br');
container.appendChild(br_field);
}

$(document).ready(function(){
 $("#tombol").click(function () {
 $("#hidden_div:visible").hide("slow");
 });
 $("#tombol").click(function () {
 $("#hidden_div:hidden").show("slow");
 });

 });

</script>


<h2><?php echo $h2_title;?></h2>
<?php
echo ! empty($message) ? '<p class="message">' . $message . '</p>': '';

	$flashmessage = $this->session->flashdata('message');
	echo ! empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>': '';
?>
<form action="<?php echo $form_action;?>" name="kirim" method="post">
<table>
	<tr>
    	<td>ID</td><td>:</td><td>
         <input type="text" name="" disabled="disabled" value="<?php echo $id;?>" />
         <input type="hidden" name="ticket_id" value="<?php echo $id;?>" />
		</td><td></td>
    </tr>
    <tr>
    	<td>Title</td><td>:</td><td><input type="text" name="title" /></td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Reference ID</td><td>:</td><td><input type="text" name="reference_id" disabled="disabled" value="<?php echo $ref;?>"  />
        	<input type="hidden" name="reference_id" value="<?php echo $ref;?>"  />&nbsp;&nbsp;<a href="Javascript:openWindowRef('<?php echo site_url('createticket/ticket/search_reference/'.$id_user);?>')"><img src="<?php echo base_url();?>images/11.png" alt="Search Reference Id" width="16" height="16" align="absmiddle" border="0" /> &nbsp;Search</a>
        </td><td></td>
    </tr>
    <tr>
    	<td>Probaility Of Impact</td><td>:</td><td>
        	
        	<select name="prob_o_impact" class="fg">
            	<option value=""></option>
            	<option value="5" class="opt1" ><span>High</span></option>
                <option value="4" class="opt2">Medium</option>
                <option value="3" class="opt3">Low</option>
                
            </select>
        </td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Vulnerability Detail</td><td>:</td><td>
        </td><td></td>
    </tr>
    <tr>
    	<td></td><td></td><td>
        <textarea name="vul_detail" rows="20"></textarea></td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Vulnerability Solution</td><td>:</td><td><textarea name="sol_detail" rows="20"></textarea></td><td>*<i>wajib di isi</i></td>
		
		
    </tr>
    <tr>
    	<td>Impact</td><td>:</td><td><input type="text" name="impact_detail" /></td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Open Datetime</td><td>:</td><td><input type="text" name="open_date" disabled="disabled" value="<?php echo date('d-m-Y H:i:s');?>"/>
        <input type="hidden" name="open_datetime" value="<?php echo date('d-m-Y H:i');?>"/>
        </td><td></td>
    </tr>

    
    <tr>
    	<td>Level Of Impact</td><td>:</td><td>
        	<select name="level_o_impact" class="fg" onchange="this.form.submit()">
            	<option value=""></option>
				<option value="5" class="opt1">Critical</option>
            	<option value="4" class="opt2">High</option>
                <option value="3" class="opt3">Medium</option>
                <option value="2" class="opt4">Low</option>
                <option value="1" class="opt5">Very Low</option>
			</select>
        </td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Severity Level</td><td>:</td><td><input type="text" name="severity_level" disabled="disabled" /></td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Target Date</td><td>:</td><td><input type="text" name="target_date" disabled="disabled" />&nbsp;</td><td></td>
    </tr>
     <tr>
    	<td>Product</td><td>:</td><td>
        	<select name="prod_id" class="fg">
            	<option value=""></option>
                <?php foreach($prod->result() as $prod) :?>
            	<option value="<?php echo $prod->prod_id;?>" ><?php echo $prod->product;?></option>
                <?php endforeach;?>
                
            </select>
        </td><td>*<i>wajib di isi</i></td>
    </tr>
    <tr>
    	<td>Close Date Time</td><td>:</td><td><input type="text" name="close_date" disabled="disabled" /></td><td></td>
    </tr>
    <tr>
    	<td>User</td><td>:</td><td><input type="text" name="user_id2" disabled="disabled" value="<?php echo $name;?>" />
        <input type="hidden" name="user_id"  value="<?php echo $id_user;?>" />
        <input type="hidden" name="user_id2" value="<?php echo $name;?>" />
        </td><td></td>
    </tr>
    <tr>
    	<td>Status</td><td>:</td><td><input type="text" name="status" disabled="disabled" /></td><td></td>
    </tr>
    <tr>
    	<td>Coments</td><td>:</td><td></td><td></td>
    </tr>
    <tr>
    	<td></td><td></td><td><textarea name="notes" cols="25" rows="20"></textarea>
        </td><td></td>
    </tr>
    <tr>
    	<td>Create Image</td><td>:</td><td></td><td></td>
    </tr>
    <tr>
    	<td></td><td></td><td><div id="file_container">
    <input name="images[]" type="file"  /><br />
    
  </div><a href="javascript:void(0);" onClick="add_file_field();">Add another</a>
</td><td></td>
    </tr>
    <tr>
    	<td></td><td></td><td><input type="submit" value="Create"  disabled="disabled" /> &nbsp;&nbsp;<input type="reset" value="Cancel" /></td><td></td>
    </tr>
    
</table>
  
</form>
<?php } ?>